/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.restaurant.domain;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author root
 */
@Entity
@XmlRootElement(name="businesstype")
@Table(name = "businesstype")
@NamedQueries({
    @NamedQuery(name = "Businesstype.findAll", query = "SELECT b FROM Businesstype b"),
    @NamedQuery(name = "Businesstype.findByBusinesstypeID", query = "SELECT b FROM Businesstype b WHERE b.businesstypeID = :businesstypeID"),
    @NamedQuery(name = "Businesstype.findByBusinesstypename", query = "SELECT b FROM Businesstype b WHERE b.businesstypename = :businesstypename"),
    @NamedQuery(name = "Businesstype.findByIsdeleted", query = "SELECT b FROM Businesstype b WHERE b.isdeleted = :isdeleted")})
public class Businesstype implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @Column(name = "BusinesstypeID")
    private Long businesstypeID;
    @Column(name = "Businesstypename")
    private String businesstypename;
    @Column(name = "isdeleted")
    private Boolean isdeleted;    

    public Businesstype() {
    }

    public Businesstype(Long businesstypeID) {
        this.businesstypeID = businesstypeID;
    }

    public Long getBusinesstypeID() {
        return businesstypeID;
    }

    public void setBusinesstypeID(Long businesstypeID) {
        this.businesstypeID = businesstypeID;
    }

    public String getBusinesstypename() {
        return businesstypename;
    }

    public void setBusinesstypename(String businesstypename) {
        this.businesstypename = businesstypename;
    }

    public Boolean getIsdeleted() {
        return isdeleted;
    }

    public void setIsdeleted(Boolean isdeleted) {
        this.isdeleted = isdeleted;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (businesstypeID != null ? businesstypeID.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Businesstype)) {
            return false;
        }
        Businesstype other = (Businesstype) object;
        if ((this.businesstypeID == null && other.businesstypeID != null) || (this.businesstypeID != null && !this.businesstypeID.equals(other.businesstypeID))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.restaurant.domain.Businesstype[businesstypeID=" + businesstypeID + "]";
    }

}
